Skip to content

fix: empty a busy output folder instead of deleting relative to cwd - #353

Open
Patrick Hintermayer (patrick-immometrica) wants to merge 1 commit into
microsoft:mainfrom
patrick-immometrica:fix/output-dir-busy-cleanup
Open

Patrick Hintermayer (patrick-immometrica) wants to merge 1 commit into
microsoft:mainfrom
patrick-immometrica:fix/output-dir-busy-cleanup

Conversation

@patrick-immometrica

Copy link
Copy Markdown

When test-results can't be removed (EBUSY, e.g. it's a mounted volume), the fallback lists the folder and calls shutil.rmtree(entry) with the bare name. That path is relative to the cwd, not the output folder, so a folder with the same name next to test-results gets deleted, and a plain file in the output folder makes the session error out.

Entries are now joined with the output folder, and files go through os.remove. Added a test for both plugins.

@patrick-immometrica

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@patrick-immometrica
Patrick Hintermayer (patrick-immometrica) marked this pull request as ready for review November 21, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant